1. Field of the Invention
Embodiments relate to a semiconductor memory device and an associated method. More particularly, embodiments relate to a semiconductor memory device having an error correction function and a method of correcting errors in a semiconductor memory device.
2. Description of the Related Art
There are two typical methods to correct errors of input data in a semiconductor memory device according to operation modes.
The first method is to detect and correct errors in a normal mode, which includes a read mode and a write mode. In a write mode, parity is calculated from the input data. The input data is stored in a data cell array and the parity is stored in a parity cell array. In a read mode, the data stored in the data cell array and the parity stored in the parity cell array are compared with each other, and an error bit is detected. Then, the error bit is corrected and corrected data is output.
The second method is to detect and correct errors in a self-refresh mode. In a self-refresh mode, all bits of data stored in the data cell array are read, parity is calculated from the read data, and the parity is stored in a parity cell array. The data stored in the data cell array and the parity stored in the parity cell array are compared to detect one or more error bits, the error bits are corrected, and the corrected bits are written back to the data cell array.
When correcting errors in a normal mode, the write time and/or the read time may be long. When correcting errors in a self-refresh mode, time for entering and/or exiting time from the refresh mode may be long.
The two methods mentioned above may be used according to applications used in the semiconductor memory device. If the application permits a long self-refresh period, errors may be corrected in the self-refresh mode. In this case, the semiconductor memory devices, particularly for a portable electronic product, need to have reduced power consumption in the self-refresh mode.